home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / cli / cliutils_mra.lha / Docs / XCom.doc < prev    next >
Encoding:
Text File  |  1998-11-06  |  8.6 KB  |  423 lines

  1.  
  2.                                    XCom v2.73
  3.                                   ============
  4.  
  5.  
  6.                            written by Mauro Panigada
  7.  
  8.  
  9. General Index
  10. ~~~~~~~~~~~~~
  11.  
  12.        Introduction ......................................... 1
  13.  
  14.        Requirements ......................................... 2
  15.  
  16.        Using XCom ........................................... 3
  17.  
  18.        Brief: using XCom .................................... 4
  19.  
  20.        XCom and Ordering .................................... 5
  21.  
  22.        History .............................................. 6
  23.  
  24.        Author ............................................... 7
  25.  
  26.  
  27.  
  28.    THIS PROGRAM IS FREEWARE. THIS MEANS YOU CAN USE AND COPY IT FREELY.
  29.              IT CAN BE INCLUDED IN FREDFISH OR WHATEVER FREE.
  30.          IT AND ITS CODE CAN NOT BE USED FOR COMMERCIAL PRODUCT.
  31.  
  32.  
  33.                                      - 1 -
  34.  
  35.  
  36.                                   Introduction
  37.                                  ==============
  38.  
  39. An Introduction to the problem
  40. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41.  
  42.    Ordering is a great program, which does (almost) anything you want.
  43.    But a little problem you can see using it, if you use it, when you
  44.    want to set the same comment to all selected file (or directory).
  45.  
  46.    I am doing an example:
  47.    You have in dh1: four files that belong to a main program, eg named
  48.    MickyMice. You want to set this comment to all files: "this belongs
  49.    to MickyMice". Through Ordering, you select all file, then click
  50.    on <Comment> gadget. It asks for a string of comment, then you say
  51.    OK, then it sets the comment to the first selected, and asks again
  52.    for the next and then the next ones. But... The comment, yes it, it
  53.    is the same for all files.
  54.  
  55.    How can you solve this problem (if you need solving it)?
  56.    Using XCom, because it has multiple files, filenote haven't.
  57.  
  58.    XCom is a cli program, but we know, Ordering can call extern tools.
  59.    It can be useful, very useful and powerful, in scripts and from
  60.    cli you can use it more powerfully. But it solves that problem, too.
  61.  
  62.  
  63.  
  64.  
  65.    XCom can clone, show and set a comment. Supports pattern-matching
  66.    and multiple files. So you can trash your long filenote command!
  67.    XCom does everything it does and more.
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.                                      - 2 -
  96.  
  97.  
  98.                                   Requirements
  99.                                  ==============
  100.  
  101. Requirements
  102. ~~~~~~~~~~~~
  103.  
  104.   You need an Amiga, of course, with at least OS3.0 (V39).
  105.   It is tested on an Amiga500 ROM 1.3, OS3.0 installed, 4 Mb RAM,
  106.   512 kb CHIP (OCS, FatAgnus), 68000. You do not need special
  107.   processor (as 68020) only because of odd addresses... (they are
  108.   slower than even)
  109.  
  110.   That's all.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                                      - 3 -
  126.  
  127.  
  128.                                    Using XCom
  129.                                   ============
  130.  
  131. Its features and its use
  132. ~~~~~~~~~~~~~~~~~~~~~~~~
  133.  
  134.                          * Very short
  135.                          * Multiple files with pattern-matching
  136.                          * (Of course) pure
  137.  
  138.              It is written in 100% assembly by Mauro Panigada
  139.  
  140.                    (This is a very important feature!)
  141.  
  142.  
  143.  
  144.   Using XCom is very simple. The TEMPLATE is:
  145.  
  146.                        FILE/A/M,C=COMMENT/K,QUIET/S
  147.  
  148.   Now I am going to show you how XCom can "understand" what you want.
  149.   In fact it can do three different actions, it dipends how you
  150.   teach it.
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157. Set comment mode
  158. ~~~~~~~~~~~~~~~~
  159.  
  160.   If you want to set a comment (the same for all) to several files,
  161.   you only must write the C or COMMENT keyword, the comment follow.
  162.  
  163.   1> xcom df4:#? C ""
  164.  
  165.   This command line will set a null comment to all files in df4:
  166.   It is the same of
  167.  
  168.   1> filenote df4:#?
  169.  
  170.   The ALL switch you can see in filenote template is not implemented
  171.   in my own XCom. I think it makes XCom command longer and it is not
  172.   so useful. When do you need to set a comment recursively?
  173.   So
  174.  
  175.   1> filenote dh0: ALL
  176.  
  177.   is not available on my XCom. But, be careful, it will delete all
  178.   comments of all files of your hd partition. When do you need it?
  179.   Probably I will never do it, if you think it can be useful, keep
  180.   filenote AND XCom... both.
  181.  
  182.   Attention, the pattern will match also the directory, and will set
  183.   that comment to the directory, but not to what it contains.
  184.  
  185.  
  186.  
  187.   1> xcom dh0:jch df2:dog df3:god df0:goddog C "greek"
  188.  
  189.   This line will set "greek" comment to all specified files, in the
  190.   different device... With filenote:
  191.  
  192.   1> filenote dh0:jch "greek"
  193.   1> filenote df2:dog "greek"                       and so on...
  194.  
  195.  
  196.  
  197.  
  198. Clone mode
  199. ~~~~~~~~~~
  200.  
  201.   This is the main function, and for this this program was written.
  202.   Simply not specifing C or COMMENT keyword and giving two or more
  203.   files, it will clone the comment from the first to the second,
  204.   the third and so on...
  205.  
  206.   1> xcom dh0:file df4:#?kk#? df2:mice df1:ux/hpux/#?
  207.  
  208.   Only a note: the pattern matching has no sense for the first
  209.   argument, which must be a file that exists, or an error will be
  210.   showed.
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Get comment mode
  220. ~~~~~~~~~~~~~~~~
  221.  
  222.   Time ago (two or three days ago, see "History"), XCom was named
  223.   clcom (clone comment) and it cloned from a file to one or many files.
  224.   Near it laid getcom, which got a comment from a file and wrote it.
  225.   Now XCom do it.
  226.  
  227.   1> XCom df0:mouse
  228.  
  229.   In this mode, pattern matching has no sense. So QUIET switch. This
  230.   mode can be used also to fill a var with the comment of a file.
  231.   See "XCom and Ordering" to know more.
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.                                      - 4 -
  251.  
  252.  
  253.                                Brief: using XCom
  254.                               ===================
  255.  
  256.  
  257. For those that haven't time...
  258.  
  259.  
  260. Set comment
  261. ~~~~~~~~~~~
  262.  
  263.   xcom FILE1 FILE2 [...] FILEn C "a comment"
  264.  
  265.   where FILE can contains wildcards
  266.  
  267.  
  268. Clone comment
  269. ~~~~~~~~~~~~~
  270.  
  271.   xcom FROM TO1 TO2 [...] TOn
  272.  
  273.   where only TO can contains wildcards
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Get comment
  283. ~~~~~~~~~~~
  284.  
  285.   xcom FILE
  286.  
  287.   where FILE is a file, no wildcards
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.                                      - 5 -
  313.  
  314.  
  315.                                XCom and Ordering
  316.                               ===================
  317.  
  318. Using it with Ordering
  319. ~~~~~~~~~~~~~~~~~~~~~~
  320.  
  321.   Load edit preferences program. Click on button. Select a gadget, where
  322.   you want put this function. It dipends on your taste. In the system I
  323.   use it is inserted in the first bank, the last gadget of the second
  324.   line.
  325.  
  326.   Now you will give me a name, eg "XComment". The search and click on
  327.   "External tools".
  328.   Fill the string gadget:
  329.  
  330.   C:XCOM C "%sr" %ase QUIET
  331.  
  332.   And make on/off what you want, about runback, output window (in this
  333.   case you won't specify QUIET)... Useful: reread source directory.
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.   Through Ordering the cloner mode is not usable. A bypass:
  345.  
  346.   On the same gadget (if you want), in the right mouse button function,
  347.   you will choose external tools, and write this string:
  348.  
  349.   C:XCOM >ENV:comment %ase
  350.  
  351.   ATTENTION, even if %ase, you MUST select only ONE file, otherwise
  352.   it will go in cloner mode, and it will clone the first to the others,
  353.   and ENV:comment will be filled with the standard output while it
  354.   does that operation. %ase is specified to permit Ordering to pass
  355.   directory, too, and get comment from them, too.
  356.  
  357.   Now, save and reread preferences.
  358.  
  359.   Test it: choose a file, rmb on the XComment gadget, choose one or
  360.   many files, lmb on XComment, $comment as string, the game is done.
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.                                      - 6 -
  375.  
  376.  
  377.                                     History
  378.                                    =========
  379.  
  380. History
  381. ~~~~~~~
  382.  
  383.   1997.04.10               v1.0 finished. Only comment cloner 
  384.                            and comment setter, but without pattern
  385.                            matching but only multiple files
  386.  
  387.   1997.04.11               fixed the behavior when QUIET switch is
  388.                            specified
  389.  
  390.   1997.04.11               v2.0, multiple pattern matching only for
  391.                            the second argument(s) (<TO/A/M>). Cloner
  392.                            and comment setter, but (!) at least two files!
  393.  
  394.   1997.04.14               v2.73, clones; sets also to a file alone;
  395.                            now also shows a comment
  396.  
  397.   1997.04.16               mainly fixed (twice!) QUIET behavior and fixed
  398.                            little bugs (2) that do not ruin its work.
  399.  
  400.   1997.04.16               first guide file
  401.  
  402.  
  403.  
  404.                                      - 7 -
  405.  
  406.  
  407.                                    The Author
  408.                                   ============
  409.  
  410. Information about me
  411. ~~~~~~~~~~~~~~~~~~~~
  412.  
  413. Address:                                     Via e-mail:
  414.  
  415.            Mauro Panigada                       linoascione@hotmail.com
  416.  
  417.            via del Fringuello, 26
  418.  
  419.            00169, ROMA
  420.  
  421.            ITALY
  422.  
  423.